<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="lib/twitter-bootstrap/css/bootstrap.css">
    <title>啦啦聊天室</title>
</head>

<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark sticky-top">
    <a class="navbar-brand" href="#">啦啦聊天室</a>
    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false"
            aria-label="Toggle navigation">
        <span class="navbar-toggler-icon"></span>
    </button>

    <div class="collapse navbar-collapse" id="navbarSupportedContent">
        <ul class="navbar-nav mr-auto">
            <li class="nav-item">
                <a class="nav-link" href="#">聊天室主页</a>
            </li>
            <li>
                <a class="nav-link" href="#" data-toggle="modal" data-target="#loginModal">设置用户</a>
            </li>
        </ul>
    </div>
</nav>
<!-- Modal -->
<div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="loginModalLable" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title" id="loginModalLable">设置用户</h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <input id="username" class="form-control" type="text" placeholder="请输入用户名">
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
                <button id="save-username" type="button" class="btn btn-primary" data-dismiss="modal">保存</button>
            </div>
        </div>
    </div>
</div>

<div class="list-group list-group-flush" style="margin-bottom: 50px">
    <div class="list-group-item flex-column align-items-start">
        <div class="d-flex w-100 justify-content-between">
            <h5 class="mb-1">🌙说明</h5>
            <small>3分钟前</small>
        </div>
        <p class="mb-1">要先在菜单中设置用户名后才能开始聊天</p>
        <small>来自网页客户端</small>
    </div>
</div>

<div class="fixed-bottom container">
    <div class="row">
        <div class="col col-9 col-sm-9 col-md-9 col-lg-9 col-xl-9">
            <label class="sr-only" for="inputMsg">消息内容</label>
            <input id="inputMsg" type="text" class="form-control" placeholder="请输入消息内容">
        </div>

        <div class="col col-3">
            <button id="submit" type="button" class="btn btn-primary mb-2" title="要先设置用户名才能发送信息" disabled="disabled">
                发送
            </button>
        </div>
    </div>
</div>

</body>
<script src="lib/jquery/jquery.js"></script>
<script src="lib/twitter-bootstrap/js/bootstrap.js"></script>
<script src="lib/@aspnet/signalr/dist/browser/signalr.js"></script>
<script src="js/chat.js"></script>
</html>